home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / msysjour / vol05 / 02 / clipbrd / viewer.h < prev    next >
Text File  |  1990-03-01  |  3KB  |  90 lines

  1. /*
  2.  * WINDOWS CLIPBOARD VIEWER - GENERAL HEADER FILE
  3.  *
  4.  * LANGUAGE      : Microsoft C 5.1
  5.  * ENVIRONMENT   : Microsoft Windows 2.1 SDK
  6.  * STATUS        : operational
  7.  *
  8.  * 1.01-Kevin P. Welch-add param to GetClipboardFmtName.
  9.  *
  10.  */
  11.  
  12. /* main menu definitions */
  13. #define IDM_STATUS        0x0100
  14. #define IDM_ADDFMT        0x0101
  15. #define IDM_REMFMT        0x0102
  16. #define IDM_EXIT          0x0103
  17. #define IDM_ABOUT         0x0104
  18. #define IDM_ERASE         0x0105
  19. #define IDM_FORMATS       0x0106
  20.  
  21. /* private message definitions */
  22. #define WM_UPDATE         (WM_USER+1)
  23. #define WM_ADDFMT         (WM_USER+2)
  24. #define WM_GETFMT         (WM_USER+3)
  25. #define WM_REMFMT         (WM_USER+4)
  26.  
  27. /* dialog box definitions */
  28. #define IDADD             0x0100
  29. #define IDFORMAT          0x0101
  30. #define IDLIBRARY         0x0102
  31.  
  32. #define IDREMOVE          0x0100
  33. #define IDLIBLIST         0x0101
  34.  
  35. /* library function addresses */
  36. #define LIB_INIT          MAKEINTRESOURCE(1)
  37. #define LIB_CREATE        MAKEINTRESOURCE(2)
  38. #define LIB_SIZE          MAKEINTRESOURCE(3)
  39. #define LIB_HSCROLL       MAKEINTRESOURCE(4)
  40. #define LIB_VSCROLL       MAKEINTRESOURCE(5)
  41. #define LIB_PAINT         MAKEINTRESOURCE(6)
  42. #define LIB_DESTROY       MAKEINTRESOURCE(7)
  43.  
  44. /* general programming extensions */
  45. #define ID(x)         GetWindowWord(x,GWW_ID)
  46. #define PARENT(x)     GetWindowWord(x,GWW_HWNDPARENT)
  47. #define INSTANCE(x)   GetWindowWord(x,GWW_HINSTANCE)
  48. #define WARNING(x,y)  MessageBox(x,y,"Clipboard Viewer",\
  49.                                  MB_OK|MB_ICONEXCLAMATION)
  50.  
  51. /* library module data structure */
  52. #define MAX_MODULE   16
  53.  
  54. typedef struct {
  55.   WORD        hModule;
  56.   WORD        wFormat;
  57. } MODULE;
  58.  
  59. typedef struct {
  60.   WORD        wModules;
  61.   MODULE      Module[MAX_MODULE];
  62. } LIBRARY;
  63.  
  64. typedef LIBRARY FAR * LPLIBRARY;
  65.  
  66. /* viewer function definitions (viewer1.c) */
  67. LONG FAR PASCAL     ViewerWndFn( HWND, WORD, WORD, LONG );
  68.  
  69. /* client and status function definitions (viewer2.c) */
  70. LONG FAR PASCAL     ClientWndFn( HWND, WORD, WORD, LONG );
  71. LONG FAR PASCAL     StatusWndFn( HWND, WORD, WORD, LONG );
  72.  
  73. /* dialog function definitions (viewer3.c) */
  74. BOOL FAR PASCAL     Dialog( HWND, LPSTR, FARPROC );
  75. BOOL FAR PASCAL     AboutDlgFn( HWND, WORD, WORD, LONG );
  76. BOOL FAR PASCAL     RemFormatDlgFn( HWND, WORD, WORD, LONG );
  77. BOOL FAR PASCAL     AddFormatDlgFn( HWND, WORD, WORD, LONG );
  78.  
  79. /* utility function definitions (viewer4.c) */
  80. BOOL FAR PASCAL     CenterPopup( HWND, HWND );
  81. WORD FAR PASCAL     GetClipboardFmtNumber( LPSTR );
  82. HANDLE FAR PASCAL   GetClipboardModule( WORD, HANDLE );
  83. WORD FAR PASCAL     GetClipboardFmtName( WORD, LPSTR, WORD, BOOL );
  84.  
  85. /* undocumented internal function definitions */
  86. int FAR PASCAL      lstrlen( LPSTR );
  87. int FAR PASCAL      lstrcmp( LPSTR, LPSTR );
  88. LPSTR FAR PASCAL    lstrcpy( LPSTR, LPSTR );
  89. LPSTR FAR PASCAL    lstrcat( LPSTR, LPSTR );
  90.